package com.demo.common.support.page;

import com.demo.common.exception.ApiException;
import com.demo.common.support.model.MultipleDataResponse;

/**
 * @author molong
 * @since 2024/5/24
 */
public class PageResponse<T> extends MultipleDataResponse<T> {

    public PageResponse(Page page) {
        setPage(page);
    }

    public PageResponse() {

    }

    /**
     * 分页信息
     */
    private Page page;

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        if (page == null) {
            throw new ApiException("Slice page can't be null!");
        }
        this.page = page;
    }
}

